package com.member.shop.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 优惠券发放对象 sys_biz_coupon_grant
 *
 * @author lixinchen
 * @date 2024-05-08
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_coupon_grant")
public class SysBizCouponGrant extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 优惠券id
     */
    @Excel(name = "优惠券id")
    private Long couponId;

    /**
     * 优惠券名称
     */
    @Excel(name = "优惠券名称")
    private String name;

    /**
     * 有效期类型(1.固定日期 2. 领取后的天数)
     */
    @Excel(name = "有效期类型(1.固定日期 2. 领取后的天数)")
    private Integer validityType;

    /**
     * 使用条件(0:表示无条件)
     */
    @Excel(name = "使用条件(0:表示无条件)")
    private BigDecimal thresholdAmount;

    /**
     * 优惠券面额
     */
    @Excel(name = "优惠券面额")
    private BigDecimal discountValue;

    /**
     * 优惠券有效期开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "优惠券有效期开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date termBeginTime;

    /**
     * 优惠券有效期结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "优惠券有效期结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date termEndTime;

    /**
     * 领取后天数
     */
    @Excel(name = "领取后天数")
    private Long receivingDay;

    /**
     * 有效天数
     */
    @Excel(name = "有效天数")
    private Long effectiveDay;

    /**
     * 发放数量(人均)
     */
    @Excel(name = "发放数量(人均)")
    private Long grantNum;

    /**
     * 发放时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发放时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date grantTime;

    /**
     * 导入用户手机号
     */
    @TableField(exist = false)
    private List<String> userPhoneList;
}
